package bll

type upgradeV1 struct {
}

var (
	upgradeInfoMap = map[int]string{
		0:   "升级成功",
		1:   "文件下载失败",
		2:   "文件校验失败",
		3:   "文件大小超过剩余空间",
		4:   "已存在升级任务",
		5:   "flash初始化失败",
		6:   "无需升级，目标版本和当前版本一致",
		7:   "固件错误，差分包基地址错误",
		100: "版本不一致",
	}
)

func (u *upgradeV1) getInfo(result int) string {
	if v, ok := upgradeInfoMap[result]; ok {
		return v
	}
	return "其他原因"
}
